/*
 * Copyright@www.it1997.com.
 * @Author: 陈晓晨
 * @Date: 2020/7/16
 * Description:版权所有 QQ:376231445
 */

package com.it1997.it1997admin.service.impl;

import com.it1997.it1997admin.mapper.MonitorMapper;
import com.it1997.it1997admin.pojo.LinuxServer;
import com.it1997.it1997admin.service.MonitorService;
import com.it1997.it1997admin.vo.LinuxServerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MonitorServiceImpl implements MonitorService {
    @Autowired
    private MonitorMapper monitorMapper;
    @Override
    public List<LinuxServer> getLinuxServer(Integer page,Integer limit) {
        Integer index=(page-1)*limit;
        Integer last=page*limit;
        return monitorMapper.getLinuxServer(index,last);
    }

    @Override
    public Integer getLinuxServerCount() {
        return monitorMapper.getLinuxServerCount();
    }

    @Override
    public LinuxServerVo getLinuxServerById(Integer serverId) {
        return monitorMapper.getLinuxServerById(serverId);
    }
}
